<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title>图形</title>

			<h1>打印等腰三角形</h1>
						<script>
						    for(var i = 1;i<=5;i++)
							{
								//打印空格
						        for(var j = 1;j<=5-i;j++){
						            document.write("&nbsp")
						        }
								//打印点
								for(var k = 1;k<=i;k++){
									document.write("*&nbsp")
								}
								//打印换行
								document.write("<br>")
						    }
						</script>
						<h2>打印平行四边形</h2>
						<script>
						    for(var i = 1;i<=5;i++){
						        for(var j = 1;j<=5-i;j++){
						            document.write("&nbsp")
						        }
								for(var k = 1;k<=5;k++){
									document.write("*&nbsp")
								}
								document.write("<br>")
						    }
						</script>
						<h2>打印菱形</h2>
						<script>
						    for(var i = 1;i<=3;i++){
						        for(var j = 1;j<=6-i-i;j++){
						            document.write("&nbsp")
						        }
								for(var k = 1;k<=2*i-1;k++){
									document.write("*&nbsp")
								}
								document.write("<br>")
						    }
						</script>
						<script>
						    for(var i = 1;i<=2;i++){
						        for(var j = 1;j<=i+i;j++){
						            document.write("&nbsp")
						        }
								for(var k = 1;k<=5-i-i;k++){
									document.write("*&nbsp")
								}
								document.write("<br>")
						    }
						</script>
	</head>
	<body>
	</body>
<html>